#ifndef __SLIST_H__
#define __SLIST_H__

// singly node type
struct snode {
    int data;
    struct snode *next;
};
typedef struct snode sNode_t;

struct slist {
    sNode_t *head;
    sNode_t *tail;
};
typedef struct slist slist_t;

void insertAfter(sNode_t *prevNode, int x); //insert x after prevNode
void insertAtFront(slist_t *list, int x); //insert x at front
void insertAtTail(slist_t *list,  int x); //insert node at tail
sNode_t* deleteFromFront(slist_t *list); //delete a node from front
void printList(slist_t *list);


#endif